import { unix2Moment } from 'src/utils/common';
import Base from './Base';
/**
 * this class only use for chat
 */
export default class Message extends Base {
  public id = '';
  public userId = '';
  public content = '';
  public createTime = 0;
  public userName = '';
  public userAvatar = '';
  public type: MessageType = MessageType.NORMAL;
  public isSent = false;
  public get timeString(): string {
    return unix2Moment(this.createTime).toNow();
  }
}
export enum MessageType {
  NORMAL = 0,
}
